from time import sleep
from unittest import TestCase

from selenium import webdriver

from po_study.po.BaiduHomePage import BaiduHomePage
from po_study.utils.Config import Config


class TestBaidu(TestCase):
    file = '../config/config.ini'
    config = Config(file)

    def test_baidu_home(self):
        self.driver=webdriver.Chrome(self.config.get_value(self.file,'system','driver'))
        baidu=BaiduHomePage(self.driver)
        baidu.open(self.config.get_value(self.file,'system','url2'))
        baidu.input_search_text()
        baidu.click_search_button()
        sleep(5)
